package com.tedu.egspringbootmvc.pojo.dto;

import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotNull;
import javax.validation.constraints.Pattern;

@Data
public class UserArticleDTO {
    @NotNull(message = "标题不能为空")
    @Pattern( regexp = "[\\u4e00-\\u9fa5]{1,20}",message = "中文要求1-30个字符")
    @ApiModelProperty(value = "标题",required = true,example = "达内吴彦祖是否是牛健帆")
    private String title;
    @Pattern(regexp = "[\\u4e00-\\u9fa5a-zA-Z0-9]{1,100}",message = "中文要求1-500个字符")
    @ApiModelProperty(value = "内容",required = true,example = "经过多方调查显示以及记者走访调查，" +
            "最终得出结论达内吴彦祖并不是牛健帆")
    private String content;
}
